package com.youngjun.user.pojo.dto;

import com.youngjun.common.pojo.dto.support.BaseDTO;

import javax.validation.Valid;
import javax.validation.constraints.Size;
import java.util.List;

public class UserDTO extends BaseDTO<UserDTO> {

    private Long id;

    //用户姓名
    private String name;

    //用户名
    private String username;

    //密码
    private String password;

    //手机号
    private String mobile;

    //邮箱
    private String email;

    //头像
    private Long avatarId;

    //地址
    private AddressDTO address;

    //所属公司
    private Long organizationId;

    private Long departmentId;

    @Valid
    @Size(max = 1,message = "最多只能选择一个角色")
    private List<Long> roleIds;

    public Long getId() {
        return id;
    }

    public UserDTO setId(Long id) {
        this.id = id;
        return this;
    }

    public String getName() {
        return name;
    }

    public UserDTO setName(String name) {
        this.name = name;
        return this;
    }

    public String getUsername() {
        return username;
    }

    public UserDTO setUsername(String username) {
        this.username = username;
        return this;
    }

    public String getPassword() {
        return password;
    }

    public UserDTO setPassword(String password) {
        this.password = password;
        return this;
    }

    public String getMobile() {
        return mobile;
    }

    public UserDTO setMobile(String mobile) {
        this.mobile = mobile;
        return this;
    }

    public String getEmail() {
        return email;
    }

    public UserDTO setEmail(String email) {
        this.email = email;
        return this;
    }

    public Long getAvatarId() {
        return avatarId;
    }

    public UserDTO setAvatarId(Long avatarId) {
        this.avatarId = avatarId;
        return this;
    }

    public AddressDTO getAddress() {
        return address;
    }

    public UserDTO setAddress(AddressDTO address) {
        this.address = address;
        return this;
    }

    public Long getOrganizationId() {
        return organizationId;
    }

    public UserDTO setOrganizationId(Long organizationId) {
        this.organizationId = organizationId;
        return this;
    }

    public Long getDepartmentId() {
        return departmentId;
    }

    public UserDTO setDepartmentId(Long departmentId) {
        this.departmentId = departmentId;
        return this;
    }

    public List<Long> getRoleIds() {
        return roleIds;
    }

    public UserDTO setRoleIds(List<Long> roleIds) {
        this.roleIds = roleIds;
        return this;
    }
}